package trans.util;

import com.google.api.translate.Language;
import com.google.api.translate.Translate;

public class TranslateUtil {

	public static String translate(String text, Language from, Language to)
		throws Exception {

		Translate.setHttpReferrer("REFERER");

		String translatedText = Translate.execute(text, from, to);

		return translatedText;

	}

}
